package com.sztx.pay.center.dataaccess.dao.mysql;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.sztx.pay.center.dataaccess.domain.OrderTransferDO;
import com.sztx.pay.center.dataaccess.domain.OrderTransferDumpDO;
import com.sztx.pay.center.dataaccess.domain.UserBindCardDO;
import com.sztx.pay.center.dataaccess.entity.QueryOrder;
import com.sztx.se.dataaccess.mysql.BaseMysqlDAO;
import com.sztx.se.dataaccess.mysql.config.PageQuery;

public interface OrderTransferMysqlDAO extends BaseMysqlDAO<OrderTransferDO> {

	Integer save(OrderTransferDO orderTransferDO);

	void delete(@Param("transferOrderId") String transferOrderId);

	int update(OrderTransferDO orderTransferDO);

	OrderTransferDO findById(@Param("transferOrderId") String transferOrderId);

	OrderTransferDO findByIdForSchedule(@Param("transferOrderId") String transferOrderId);

	OrderTransferDO findByOrderId(@Param("orderId") String orderId);

	List<UserBindCardDO> findAll();

	List<OrderTransferDO> findQuery(@Param("query") QueryOrder query, @Param("pageQuery") PageQuery pageQuery);

	Integer totalCount(QueryOrder queryOrder);

	Integer dumpCount(@Param("startTime") String startTime, @Param("endTime") String endTime);
	
	List<OrderTransferDumpDO> findUnHandleForSchedule(@Param("taskItemNum") Integer taskItemNum, @Param("taskItems") List<String> taskItems, @Param("fetchNum") Integer fetchNum,
			@Param("startTime") String startTime, @Param("endTime") String endTime);

	int updateHandleForSchedule(@Param("tradeOrderId") String tradeOrderId, @Param("oldStatus") List<Integer> oldStatus, @Param("newStatus") Integer newStatus, @Param("num") Integer num);
	
	void deleteDumpCount(@Param("startTime") String startTime, @Param("endTime") String endTime);
	
	int batchUpdateHandleForSchedule(@Param("tradeOrderIds") List<String> tradeOrderIds, @Param("oldStatus") List<Integer> oldStatus, @Param("newStatus") Integer newStatus, @Param("num") Integer num);
}